package com.bo.Entity;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;




public class CompanyInt {

	private int id;
	private int model;
	private String title;
	private String content;
	private int  companyId;
	private MyImage image1;
	private MyImage image2;
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	public int getModel() {
		return model;
	}
	public void setModel(int model) {
		this.model = model;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}

	public int getCompanyId() {
		return companyId;
	}
	public void setCompanyId(int companyId) {
		this.companyId = companyId;
	}
	public MyImage getImage1() {
		return image1;
	}
	public void setImage1(MyImage image1) {
		this.image1 = image1;
	}
	public MyImage getImage2() {
		return image2;
	}
	public void setImage2(MyImage image2) {
		this.image2 = image2;
	}

	
	
	
	
	public static void main(String[] agrs){
		
		CompanyInt cpi=new CompanyInt();
		
		cpi.setContent("dddd");
		cpi.setId(12);
		cpi.setTitle("adfa");
		cpi.setModel(11);
		cpi.setImage1(new MyImage(1,"daa.jpg"));
		
		
		Class<?> clazz = cpi.getClass();
		
		Map<String,String> map=new HashMap<String,String>();
		
		
		try{
			
		  for(Field field:clazz.getDeclaredFields()){
			
			Object value=  field.get(cpi);
			  
			if(value!=null)
			System.out.println(field.getName()+" : "+value.toString());
			
			
		  }
		
		
		}catch(Exception e){
			
		    e.printStackTrace();
		}
	}
	
	
}
